<template>
    <div class="all" >
   
        <router-view/>
        <div class="tail">
            <div class="home" @click="home">
                <el-icon size="60px" >
                    <House />
                </el-icon>
                <el-text>首页</el-text>
            </div>
            <div class="mine" @click="self">
                <el-icon size="60px">
                    <User />
                </el-icon>
                <el-text>我的</el-text>
            </div>
            <div class="exit">
                <el-icon size="60px">
                    <Close />
                </el-icon>
                <el-text>退出</el-text>
            </div>
        </div>
    </div>
</template>

<script setup>
import { useRoute, useRouter } from "vue-router";
import { ref, inject } from "vue";



import {
    Refresh,
    Service,
    Memo,
    ShoppingTrolley,
    School,
    Operation,
    Edit,
    OfficeBuilding,
    HomeFilled,
    House,
    Box,
    User,
    Close,
    Iphone,
    Location,
    Tickets,
    ChatDotSquare,
    Calendar,
    Bell,
    Coordinate,
    Search
} from "@element-plus/icons-vue";
const route = useRoute();
const router = useRouter();
const axios = inject("axios");
const user = sessionStorage.getItem("user");
let userobj = JSON.parse(user);
let userdata = userobj._value;


const home=()=>{
    router.push('/workerMainPage/workerFirstPage');
}
const init = () => {
    router.push('/workerMainPage/workerFirstPage')
};
init();

const self=()=>{
    router.push('/workerMainPage/workerSelfPage')
}
</script>

<style scoped>
.tail {
    top: 590px;
    display: flex;
    flex-direction: row;
    padding-left: 40px;
    padding-right: 40px;
    justify-content: space-between;
    position: fixed;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.all {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    /* 100%窗口高度 */
    height: 100vh;
    /* 弹性布局 居中 */
    align-items: center;
    /* 渐变背景 */
    background: linear-gradient(200deg, #c5ebe3, #a9c1ed);
    /* 溢出隐藏 */
    overflow: hidden;
}

.home {
    width: 90px;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
    align-items: center;
}

.mine {
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 30px;
    margin-right: 30px;
}

.exit {
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
}



.square ul li {
    position: absolute;
    border: 1px solid #fff;
    background-color: #fff;
    width: 15px;
    height: 15px;
    list-style: none;
    opacity: 0;
}

.square li {
    top: 30vh;
    left: 30vw;
    /* 执行动画：动画名 时长 线性的 无限次播放 */
    animation: square 10s linear infinite;
}

.square li:nth-child(2) {
    top: 80vh;
    left: 5vw;
    /* 设置动画延迟时间 */
    animation-delay: 2s;
}

.square li:nth-child(3) {
    top: 60vh;
    left: 45vw;
    /* 设置动画延迟时间 */
    animation-delay: 4s;
}

.square li:nth-child(4) {
    top: 40vh;
    left: 70vw;
    /* 设置动画延迟时间 */
    animation-delay: 6s;
}

.square li:nth-child(5) {
    top: 80vh;
    left: 10vw;
    /* 设置动画延迟时间 */
    animation-delay: 8s;
}

.circle li {
    bottom: 0;
    left: 15vw;
    /* 执行动画 */
    animation: circle 10s linear infinite;
}

.circle li:nth-child(2) {
    left: 35vw;
    /* 设置动画延迟时间 */
    animation-delay: 2s;
}

.circle li:nth-child(3) {
    left: 55vw;
    /* 设置动画延迟时间 */
    animation-delay: 6s;
}

.circle li:nth-child(4) {
    left: 75vw;
    /* 设置动画延迟时间 */
    animation-delay: 4s;
}

.circle li:nth-child(5) {
    left: 70vw;
    /* 设置动画延迟时间 */
    animation-delay: 8s;
}

/* 定义动画 */
@keyframes square {
    0% {
        transform: scale(0) rotateY(0deg);
        opacity: 1;
    }

    100% {
        transform: scale(5) rotateY(1000deg);
        opacity: 0;
    }
}

@keyframes circle {
    0% {
        transform: scale(0) rotateY(0deg);
        opacity: 1;
        bottom: 0;
        border-radius: 0;
    }

    100% {
        transform: scale(5) rotateY(1000deg);
        opacity: 0;
        bottom: 90vh;
        border-radius: 50%;
    }
}







</style>